﻿using System;
using System.Data;
using System.Data.SqlClient;
using DevExpress.XtraReports.UI;
using prjKQXS_DLL;

namespace prjKQXS_Report
{
    public partial class rpt_DSDaiLyCap1 : DevExpress.XtraReports.UI.XtraReport
    {
        //string Ma_DM_DONVI="";
        public rpt_DSDaiLyCap1()
        {
            InitializeComponent();
            //this.Ma_DM_DONVI = Ma_DM_DONVI;
            
            //Report_DAL report_dal= new Report_DAL();

            //dsReports1 = report_dal.reportDungChung(dsReports1);

            //dsReports1= report_dal.loadAllCanBo(dsReports1,Ma_DM_DONVI,true);
        }

        public static void View()
        {
            SqlConnection conn = new SqlConnection(BienTc.connString);
            string sql = "proc_rpt_DSDaiLyCap1";
            SqlDataAdapter da = new SqlDataAdapter(sql, conn);
            da.SelectCommand.CommandType = CommandType.StoredProcedure;
            dsReports ds = new dsReports();
            da.Fill(ds, "rptDMCanBo");

            rpt_DSDaiLyCap1 rpt = new rpt_DSDaiLyCap1();
            rpt.DataSource = ds;
            rpt.ShowRibbonPreviewDialog();
        }
    }
}
